Move ostree-* executables to /usr/lib/ostree
authorGatis Paeglis <gatis.paeglis@qt.io>
Tue, 9 Aug 2016 13:23:04 +0000 (15:23 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 11 Aug 2016 14:04:59 +0000 (14:04 +0000)
Why not to use libexecdir?

Because this directory does not exist on some distros or paths
between distros varies. There are several reasons why a well
known path is prefered, for example when generating a kernel
command line:

init=${ostree}/usr/lib/ostree-boot/ostree-prepare-root

In addition this saves us some typing in a console when wanting
to access the "ostree" cmd line.

Closes: #449
Approved by: cgwalters

Makefile-boot.am
Makefile-decls.am
Makefile-switchroot.am
src/boot/dracut/module-setup.sh
src/boot/mkinitcpio/ostree
src/boot/ostree-prepare-root.service
src/boot/ostree-remount.service
src/libostree/ostree-bootloader-grub2.c

index 508f59bcab1a2698b8271b5695ded294bf01c088..8d7ade079f17f623da28c8a8bbb755786a427c05 100644 (file)
@@ -53,7 +53,7 @@ grub2configdir = $(sysconfdir)/grub.d
 INSTALL_DATA_HOOKS += install-grub2-config-hook
 else
 # We're using our internal generator
-libexec_SCRIPTS = src/boot/grub2/ostree-grub-generator
+ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator
 endif
 
 EXTRA_DIST += src/boot/dracut/module-setup.sh \
index f7ebd422a9ffa38031c2279a729c863022988b69..d7e61355667ef63caa3a4dcce8839de9f10e1b17 100644 (file)
@@ -43,6 +43,8 @@ gir_DATA =
 typelibdir = $(libdir)/girepository-1.0
 typelib_DATA =
 gsettings_SCHEMAS =
+ostree_bootdir = /usr/lib/ostree
+ostree_boot_PROGRAMS =
 
 # This is a special facility to chain together hooks easily
 INSTALL_DATA_HOOKS =
index ef837ced2bed02f2e8e8d62a595015cbffb01051..f79553eb7fcecef0ec5468285ea369a856c716ed 100644 (file)
 # Boston, MA 02111-1307, USA.
 
 if BUILDOPT_SYSTEMD
-sbin_PROGRAMS += ostree-prepare-root
-sbin_PROGRAMS += ostree-remount
+
+ostree_boot_PROGRAMS += ostree-prepare-root
+ostree_boot_PROGRAMS += ostree-remount
+
 noinst_LTLIBRARIES += libswitchroot-mountutil.la
 endif
 
index d8ee05baccabca83eb6f0116473367926ca38ffa..20c828dcc182d21c5ae949c94c456bc395ed98ab 100755 (executable)
@@ -20,7 +20,7 @@
 # Boston, MA 02111-1307, USA.
 
 check() {
-    if [[ -x $systemdutildir/systemd ]] && [[ -x /usr/sbin/ostree-prepare-root ]]; then
+    if [[ -x $systemdutildir/systemd ]] && [[ -x /usr/lib/ostree/ostree-prepare-root ]]; then
        return 255
     fi
 
@@ -32,7 +32,7 @@ depends() {
 }
 
 install() {
-    dracut_install ostree-prepare-root
+    dracut_install /usr/lib/ostree/ostree-prepare-root
     inst_simple "${systemdsystemunitdir}/ostree-prepare-root.service"
     mkdir -p "${initdir}${systemdsystemconfdir}/initrd-switch-root.target.wants"
     ln_r "${systemdsystemunitdir}/ostree-prepare-root.service" \
index 467483708362021d391ff6270d477e8a5369d3bf..7f21cacd63e53f9d247f13498d875bf3f3a5653c 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
 build() {
-    add_binary /usr/sbin/ostree-prepare-root
-    add_binary /usr/sbin/ostree-remount
+    add_binary /usr/lib/ostree/ostree-prepare-root
+    add_binary /usr/lib/ostree/ostree-remount
 
     add_file /usr/lib/systemd/system/ostree-prepare-root.service
     add_symlink /usr/lib/systemd/system/initrd-switch-root.target.wants/ostree-prepare-root.service \
index dbc7b30a1aa5244818fd30481770da49ab333a1e..e0659d1029a45ce822897e36677f257caef17f72 100644 (file)
@@ -27,7 +27,7 @@ Before=plymouth-switch-root.service
 
 [Service]
 Type=oneshot
-ExecStart=/usr/sbin/ostree-prepare-root /sysroot
+ExecStart=/usr/lib/ostree/ostree-prepare-root /sysroot
 StandardInput=null
 StandardOutput=syslog
 StandardError=syslog+console
index 196649b76b0f1440d6149bee697b02658ca1a0a1..61dd5fa8308cdb0137904c4acd5e9036200441ce 100644 (file)
@@ -31,7 +31,7 @@ Before=systemd-tmpfiles-setup.service
 
 [Service]
 Type=oneshot
-ExecStart=/usr/sbin/ostree-remount
+ExecStart=/usr/lib/ostree/ostree-remount
 StandardInput=null
 StandardOutput=syslog
 StandardError=syslog+console
index b2c68ac9dc0c93118a0affec6977d9f086e11b9e..f3dc8e16815b5ea8c940aa83460c4b9b1f9c08eb 100644 (file)
@@ -315,7 +315,7 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader      *bootloader,
         use_system_grub2_mkconfig = FALSE;
     }
   else
-    grub_exec = use_system_grub2_mkconfig ? GRUB2_MKCONFIG_PATH : LIBEXECDIR "/ostree-grub-generator";
+    grub_exec = use_system_grub2_mkconfig ? GRUB2_MKCONFIG_PATH : "/usr/lib/ostree/ostree-grub-generator";
 
   if (use_system_grub2_mkconfig && ostree_sysroot_get_booted_deployment (self->sysroot) == NULL
       && g_file_has_parent (self->sysroot->path, NULL))